public class HomeWork05_04{
    public static void main(String[] args){
        int ans = 0;
        int i = 1;
        while(ans <= 500){
            ans += i;
            ++i;
        }
        System.out.println("结果为：" + ans);
    }
}